/**
 *
 */
Ext.define('vacake.view.ShoppingEdit', {
    extend: 'Ext.Container',
    xtype: 'shoppingEditView',

    config: {
        style:'background:#EEEAE0',
        scrollable: false,
        height:'100%',
        layout: 'vbox',
        items: [
            {
                xtype: 'toolbar',
                docked: 'top',
                title: '修改',
                items: [
                    {  text: '返回', id: 'back_button', ui: 'action-back'},
                    { xtype: "spacer" },
                    {  text: '完成', id: 'complete'}
                ]
            },
            {
                xtype: 'panel',
                id: 'shoppingProductInfo',
                cls:'shoppingEdit_bg shadow radius',
                html: '',
                items: [

                    {
                        xtype: 'hiddenfield',
                        id: 'showItemsId',
                        name: 'showItemsId'
                    },
                    {
                        xtype: 'hiddenfield',
                        id: 'showCpId',
                        name: 'showCpId'
                    }
                ]
            },{
                cls:'fenge'
            },
            {
                xtype: 'fieldset',
                layout: {type: 'hbox', align: 'middle', pack: 'center', ui: 'confirm'},
                cls:'shopping_numBg color6 font2',
                items: [
                    {
                        xtype: 'label',
                        style:'margin-right:10px ',
                        html: '数量'
                    },
                    {
                        xtype: 'textfield',
                        id: 'showNumber',
                        name: 'showNumber',
                        readOnly: true,
                        width: '50px'
                    },
                    {
                        xtype: 'label',
                        style:'margin-left:15px',
                        html: '个'
                    }
                ]
            },
            {
                xtype: 'panel',
                layout: {type: 'vbox', pack: 'center'},
                cls:'shoppingEdit_bg shadow radius',
                items: [
                    {
                        xtype: 'panel',
                        layout: {type: 'hbox', align: 'middle', pack: 'center'},
                        style:'margin:0 0 10px 0',
                        items: [
                            {
                                xtype: 'button',
                                id: 'reduce',
                                text: '减少',
                                ui: 'confirm',
                                width: '40%',
                                margin: '0 5% 0 0'
                            },
                            {
                                xtype: 'button',
                                id: 'augment',
                                text: '增加',
                                ui: 'confirm',
                                width: '40%'
                            }
                        ]
                    },
                    {
                        xtype: 'panel',
                        layout: {type: 'hbox', align: 'middle', pack: 'center'},
                        items: [
                            {
                                xtype: 'button',
                                id: 'delete',
                                text: '删除',
                                ui: 'confirm',
                                width: '40%',
                                margin: '0 5% 0 0'
                            },
                            {
                                xtype: 'button',
                                id: 'collectButton',
                                text: '收藏',
                                ui: 'confirm',
                                width: '40%'
                            }
                        ]
                    }
                ]
            }
        ], listeners: {
            back: function () {
                var backid = Ext.Viewport.getInnerItems().length - 2;
                Ext.Viewport.remove(Ext.Viewport.getActiveItem(), true);
                Ext.Viewport.setActiveItem(backid);
            }
        }
    }

});

